# @shuaige : 陈世玉
# @name
# 03-元素信息.py
# @time :2024/12/5 20:17
from selenium import webdriver
path='chromedriver.exe'
browser = webdriver.Chrome(path)

url='https://www.baidu.com'
browser.get(url)

input=browser.find_element_by_id('su')
print(input.get_attribute('class'))#获取元素的属性名
print(input.tag_name)#获取元素的标签名
print(input.text)

browser.quit()